<?php
    Zend_Loader::loadClass("Zend_Json_Encoder");
    $i = 0;
    $res = array();
    /*foreach($this->recs as $rec)
    {
        $res[$i]['id'] = $rec->id;
        $res[$i]['name'] = $rec->name;
        $res[$i]['category'] = $rec->category;
        $res[$i]
        $i = $i + 1;
    }*/
    echo '{rows:'.Zend_Json_Encoder::encode($this->recs->toArray()).'}';
?>